package camid.distribution.events;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

public class MockFutureNotificator implements FutureNotificator{

	private FutureNotificator notificator;

	public MockFutureNotificator(FutureNotificator notificator)
	{
		this.notificator = notificator;
	}

	@Override
	public Future<Void> notifyEvent(Object object) {
		Future<Void> future = this.notificator.notifyEvent(object);
		try {
			future.get();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ExecutionException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return future;
	}

}
